<h1>IMS Simple Learning Tools Interoperability</h1>
<p>This system does not maintain its own accounts.  
It is built from the ground up to accept its login and roster 
information from some other learning management system 
using the IMS Simple LTI protocol.  You can see detail 
of the protocol at
<a href="http://simplelti.appspot.com/">http://simplelti.appspot.com/</a>
if you like.  
</p>
<p>
You can login to this application from several places: 
(1) Sakai using the SimpleLTI tool, 
(2) Moodle using the SimpleLTI tool, 
(3) www.cloudcollab.com, 
(4) simplelti.appspot.com, or 
(5) you can simulate the launch using the form below.
</p>
<p>This form POST will simulate the REST web service call which is 
sent form the LMS to the tool to do the Single-Sign-On and 
roster provisioning.  The post includes security signatures
so that your message is validated - which are included below.
You can change any of the information to be a different person
or be part of a different course or use the system with a
different role.  Both digests are generated with a password of secret.
</p>
<form action="/" method="post"> 
<!--<form action="/lti_course_id/zzz123" method="post"> -->
  <div><input type="submit" value="Submit Launch Parameters"></div>
  <fieldset>
    <legend>Action</legend>
    <div class="req">action
        <select name="action" >
          <option selected>direct</option>
          <option>launchhtml</option>
          <option>launchresolve</option>
        </select> 
        <p>
        "direct" provisions the launch and the redirects to the tool.  "launchhtml" provisions the launch
        then returns a lot of debug output.  "launchresolve" gets you the REST response in XML (view source).
        </p>
    </div>
  </fieldset>
  <fieldset>
    <legend>Security Materials (generated using secret as secret)</legend>
    <div>sec_digest<input type="text" size="40" name="sec_digest" 
        value="{{ digest }}"/></div>
    <div>sec_org_digest<input type="text" size="40" name="sec_org_digest" 
        value="{{ digest }}"/></div>
    <div>sec_nonce<input type="text" size="40" name="sec_nonce" 
        value="{{ nonce }}"/></div>
    <div>sec_created<input type="text" size="40" name="sec_created" 
        value="{{ created }}"/></div>
    <div>secret <input type="text" size="40" name="sec_secret" 
        value="secret"/>  (testing only) </div>
    <p>These security fields are not required from the protocol perspective.  A particular
       external tool may not work without them.  If sec_digest or sec_org_digest is present, 
       then sec_created and sec_nonce are required.</p>
  </fieldset>
  <fieldset>
    <legend>User Materials</legend>
    <div class="req">user_id <input type="text" size="40" name="user_id" 
        value="0ae836b9-7fc9-4060-006f-27b2066ac545"/></div>
    <div class="req">user_role
        <select name="user_role" >
          <option>Instructor</option>
          <option>Student</option>
          <option>Administrator</option>
        </select> 
    </div>
    <div>user_displayid <input type="text" size="20" name="user_displayid" 
        value="csev"/></div>
    <div>user_firstname <input type="text" size="40" name="user_firstname" 
        value="Charles"/></div>
    <div>user_lastname <input type="text" size="40" name="user_lastname" 
        value="Severance"/></div>
    <div>user_fullname <input type="text" size="40" name="user_fullname" 
        value="Charles Severance"/></div>
    <div>user_email <input type="text" size="40" name="user_email" 
        value="csev@umich.edu"/></div>
    <div>user_locale <input type="text" size="20" name="user_locale" 
        value="en_US"/></div>
    <div>user_roster <input type="text" size="40" name="user_roster" 
        value="SI300-010-F08"/></div>
  </fieldset>
  <fieldset>
    <legend>Course Information</legend>
    <div class="req">course_id <input type="text" size="40" name="course_id" 
        value="8213060-006f-27b2066ac545"/></div>
    <div>course_code <input type="text" size="40" name="course_code" 
        value="SI300-001-F08"/></div>
    <div>course_name <input type="text" size="20" name="course_name" 
        value="SI300"/></div>
    <div>course_title <input type="text" size="40" name="course_title" 
        value="Social Computing"/></div>
  </fieldset>
  <fieldset>
    <legend>Organizational Information</legend>
    <div>org_id <input type="text" size="40" name="org_id" 
        value="umich.edu"/></div>
    <div>org_title <input type="text" size="80" name="org_title" 
        value="University of Michigan (CTools)"/></div>
    <div>org_name <input type="text" size="20" name="org_name" 
        value="UMich"/></div>
    <div>org_url <input type="text" size="20" name="org_url" 
        value="https://ctools.umich.edu"/></div>
    <p>If sec_org_digest is present, then org_id is required.</p>
  </fieldset>
  <fieldset>
    <legend>Launch Information</legend>
    <div class="req">launch_resource_id <input type="text" size="40" name="launch_resource_id" 
        value="27b2066ac545"/></div>
    <div>launch_targets <input type="text" size="20" name="launch_targets" 
        value="widget,post,iframe"/> The launch_targets field gives preference order of the launch response type - (iframe is default)
    </div>
    <div>launch_resource_url <input type="text" size="40" name="launch_resource_url" 
        value="http://www.dr-chuck.com/"/></div>
    <div>launch_tool_id <input type="text" size="20" name="launch_tool_id" 
        value="{{ toolid }}"/></div>
    <div>launch_tool_name <input type="text" size="20" name="launch_tool_name" 
        value="Video"/></div>
    <div>launch_tool_title <input type="text" size="40" name="launch_tool_title" 
        value="Video Review for Midterm"/></div>
    <div>launch_width <input type="text" size="20" name="launch_width" 
        value="320"/></div>
    <div>launch_height <input type="text" size="20" name="launch_height" 
        value="240"/></div>
  </fieldset>
  <div><input type="submit" value="Submit Launch Parameters"></div>
</form>
